﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using Bussiness;

namespace UI
{
    public partial class AlertForm : KryptonForm
    {
        public bool DiaLogShowed = false;
        
        public AlertForm()
        {
            InitializeComponent();
        }

        private void AlertForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            
        }

        private void Sure_Click(object sender, EventArgs e)
        {
            this.DiaLogShowed = false;
            if (SessionHelper.CurrentUser.Role == "老师")
            {
                int myClassRoom = Convert.ToInt32(ConfigurationManager.AppSettings["MyClassRoom"]);
                SysConfigsManager sc = new SysConfigsManager();
                int lastGID = sc.GetLastGroupID();
                BestRoutesManager br = new BestRoutesManager();
                br.UpdateRouteStatus(myClassRoom, lastGID);
            }
            //else if (SessionHelper.CurrentUser.Role == "消防队")
            //{
            //    FireGroupManager fg = new FireGroupManager();
            //    fg.UpdateStatus(null, "2");
            //}
            //else if (SessionHelper.CurrentUser.Role == "医护人员")
            //{
            //    FireGroupManager fg = new FireGroupManager();
            //    fg.UpdateStatus("2", null);
            //}
            this.Close();
        }
    }
}
